package com.hicc.cloud.teacher.fragment;

import android.content.Intent;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.hicc.cloud.R;
import com.hicc.cloud.teacher.activity.CollegeFacultyComparedActivity;
import com.hicc.cloud.teacher.activity.LiveReportsActivity;
import com.hicc.cloud.teacher.activity.OnlineReportActivity;
import com.hicc.cloud.teacher.activity.PayStatisticsActivity;

import mehdi.sakout.fancybuttons.FancyButton;


/**
 * Created by Administrator on 2016/9/24/024.
 * Alter by i_cassell on 2016/9/25.
 * 学院领导
 */

public class SchoolHomeFragment extends BaseFragment implements View.OnClickListener {
    // 加载数据
    @Override
    public void fetchData() {
    }

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.fragment_home_college, container, false);

        initUI(view);


        return view;
    }

    private void initUI(View view) {
        // 迎新替换
        FancyButton btn_live = (FancyButton) view.findViewById(R.id.btn_live);
        FancyButton btn_online = (FancyButton) view.findViewById(R.id.btn_online);
        FancyButton btn_comparison = (FancyButton) view.findViewById(R.id.btn_comparison);
        FancyButton btn_pay = (FancyButton) view.findViewById(R.id.btn_pay);

        btn_live.setOnClickListener(this);
        btn_online.setOnClickListener(this);
        btn_comparison.setOnClickListener(this);
        btn_pay.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            // 现场报到
            case R.id.btn_live:
                startActivity(new Intent(getContext(), LiveReportsActivity.class));
                break;
            // 网上报到
            case R.id.btn_online:
                startActivity(new Intent(getContext(), OnlineReportActivity.class));
                break;
            // 交费统计
            case R.id.btn_pay:
                startActivity(new Intent(getContext(), PayStatisticsActivity.class));
                break;
            // 学院对比
            case R.id.btn_comparison:
                startActivity(new Intent(getContext(), CollegeFacultyComparedActivity.class));
                break;
        }
    }
}
